local yanhui_skill = fk.CreateSkill {

  name = "yanhui_skill",

  tags = {  },

}



yanhui_skill:addEffect("cardskill", {
  prompt = "#yanhui_skill",
  can_use = Util.GlobalCanUse,
  on_use = Util.GlobalOnUse,
  mod_target_filter = Util.TrueFunc,
  on_effect = function(self, room, effect)
    local player = effect.from
    local target = effect.to
    if target:isWounded() and not target.dead then
      room:recover({
        who = target,
        num = 1,
        recoverBy = player,
        card = effect.card,
        skillName = yanhui_skill.name,
      })
    elseif target.hp == target.maxHp then
      room:setPlayerMark(target, "@@hezui", 1)
      room:setPlayerMark(target, "@!hezui", 1)
    end
  end
})

return yanhui_skill